<%--
  Author hiberk
  Date: 2017/6/27
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/inc/tag.jsp" %>
<script type="text/javascript">
    $(function () {
        var href = location.href.split("?")[0];
        var host = location.host.split("?")[0];
        var uri = href.substring(host.length + 7);
        var a = $(".page-sidebar-menu > li > ul > li>a[url='" + uri + "']");
        var forward = document.referrer.split("?")[0];
        if (uri.indexOf(a)) {
            a = $(".page-sidebar-menu a[url='"+uri+"']");
        }
        var oneMenu = a.parent();
        oneMenu.addClass("active");
        oneMenu.parent().prev().append("<span class='selected'></span>");
        oneMenu.parent().prev().find(".arrow").addClass("open");
    })

</script>
<div class="page-sidebar navbar-collapse collapse">
    <!-- BEGIN SIDEBAR MENU -->
    <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->
    <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->
    <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->
    <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
    <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->
    <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->
    <ul class="page-sidebar-menu " data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
        <!-- DOC: To remove the sidebar toggler from the sidebar you just need to completely remove the below "sidebar-toggler-wrapper" LI element -->
        <li class="sidebar-toggler-wrapper">
            <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
            <div class="sidebar-toggler">
            </div>
            <!-- END SIDEBAR TOGGLER BUTTON -->
        </li>
        <!-- DOC: To remove the search box from the sidebar you just need to completely remove the below "sidebar-search-wrapper" LI element -->
        <c:if test="${distributor.getType() eq 1}">
        <li class="margin-top-20">
            <a href="${_PATH}/distributor/admin">
                <i class="icon-home"></i>
                <span class="title">首页</span>
                <span class="arrow"></span>
            </a>
        </li>
        </c:if>
        <li class="start active open margin-top-20">
            <a href="javascript:;">
                <i class="icon-home"></i>
                <span class="title">分销商</span>
                <span class="selected"></span>
                <span class="arrow open"></span>
            </a>
            <ul class="sub-menu">
                <li class="active">
                    <a href="${_PATH}/distributor/details">
                        <i class="icon-bar-chart"></i>
                        详情</a>
                </li>
                <li>
                    <a href="${_PATH}/distributor/withdraw">
                        <i class="icon-bulb"></i>
                        提现</a>
                </li>
                <li>
                    <a href="${_PATH}/distributor/promotion">
                        <i class="icon-graph"></i>
                        推广链接</a>
                </li>
            </ul>
        </li>
        <c:if test="${distributor.getType() eq 1}">
        <li>
            <a href="javascript:;">
                <i class="icon-basket"></i>
                <span class="title">审核</span>
                <span class="arrow "></span>
            </a>
            <ul class="sub-menu">
                <li>
                    <a href="${_PATH}/auditing">
                        <i class="icon-home"></i>
                        审核认证</a>
                </li>
                <li>
                    <a href="${_PATH}/auditing/review">
                        <i class="icon-tag"></i>
                        分成复核</a>
                </li>
                <li>
                    <a href="${_PATH}/withdraw">
                        <i class="icon-handbag"></i>
                        审核订单</a>
                </li>
            </ul>
        </li>
        </c:if>
    </ul>
    <!-- END SIDEBAR MENU -->
</div>